import service from './service'

export default {
	user: {
		login: params => service('/login', params, 'post'), // 验证码
	},
	sort: {
		list: params => service('/sxsd/orderSorting/details', params, 'get'), // 分拣任务
		addSort: params => service('/sxsd/orderSorting', params, 'post'), // 提交分拣
		editSort: params => service('/sxsd/orderSorting/edit', params, 'post'), // 修改分拣
		detailsGoods: params => service('/sxsd/orderSorting/detailsGoods', params, 'get'), // 需要分拣的商品列表
		historyList: params => service('/sxsd/orderSorting/list', params, 'get'), // 分拣记录
		listDetails: params => service('/sxsd/orderSorting/listDetails', params, 'get'), // 分拣明细
		batchNos: params => service('/sxsd/orderSorting/batchNos', params, 'get'), // 查询批次
	},
	dis: {
		list: params => service('/sxsd/warehouseSorting/details', params, 'get'), // 分拣任务
		addSort: params => service('/sxsd/warehouseSorting', params, 'post'), // 提交分拣
		editSort: params => service('/sxsd/warehouseSorting/edit', params, 'post'), // 修改分拣
		detailsGoods: params => service('/sxsd/warehouseSorting/detailsGoods', params, 'get'), // 需要分拣的商品列表
		historyList: params => service('/sxsd/warehouseSorting/list', params, 'get'), // 分拣记录
		listDetails: params => service('/sxsd/warehouseSorting/listDetails', params, 'get'), // 分拣明细
		batchNos: params => service('/sxsd/warehouseSorting/batchNos', params, 'get'), // 查询批次
	},
	procurement: {
		supplierlist: params => service('/sxsd/supplier/list', params, 'get'), // 供货商列表
		addSupplier: params => service('/sxsd/supplier', params, 'post'), // 添加供货商
		getSupplier: id => service('/sxsd/supplier/' + id, 'get'), // 获取详情
		updateSupplier: params => service('/sxsd/supplier', params, 'put'), // 修改供货商
		goodlist: params => service('/sxsd/purchaseTool/goods', params, 'get'), // 商品列表
		goodaudit: params => service('/sxsd/goods/audit', params, 'put'), // 审核商品
		changestatus: params => service('/sxsd/goods/changeStatus', params, 'put'), // 上下架商品
		addGoodsPage: params => service('/sxsd/goods/addGoods', params, 'get'), // 查询供应商
		addGoods: params => service('/sxsd/goods', params, 'post'), // 添加商品
		updateGoods: params => service('/sxsd/goods', params, 'put'), //修改商品
		getGoods: id => service("/sxsd/goods/" + id, 'get'), // 获取商品详情
		getPurchaseItem: params => service('/sxsd/purchaseTool/purchaseItems', params, 'get'), // 采购单详情
		getPurchaseItemorder: params => service('/sxsd/purchaseTool/orders', params, 'get'), // 采购单详情
		updatePurchaseItem: params => service('/sxsd/purchaseItem', params, 'put'), // 修改采购单
		getIndex: params => service('/sxsd/purchaseTool/index', params, 'get'), // 首页数据
		audit: params => service('/sxsd/goods/audit', params, 'put'), // 审核商品
		changeStatus: params => service('/sxsd/goods/changeStatus', params, 'put'), // 上下架商品

		shopIndex: params => service('/sxsd/supplierTool/index', params, 'get'), // 商家首页数据
		shopPurchaseItem: params => service('/sxsd/supplierTool/purchaseItems', params, 'get'), // 商家采购单详情
		shopPurchaseItemorder: params => service('/sxsd/supplierTool/orders', params, 'get'), // 商家采购单详情
		shopupdatePurchaseItem: params => service('/sxsd/supplierTool/purchaseItems', params, 'put'), // 商家修改采购单
		shopaddGoods: params => service('/sxsd/supplierTool/goods', params, 'post'), // 商家添加商品
		shopupdateGoods: params => service('/sxsd/supplierTool/goods', params, 'put'), //商家修改商品
		shopgoodlist: params => service('/sxsd/supplierTool/goods', params, 'get'), // 商家商品列表

	}
}